﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PatternLib.Responsibility
{
    public class Manager : ResponsibilityChain
    {
        public Manager() {
            this.Name = "经理";
        }
        public override void Execute(ResponsibilityNode applyContext)
        {
            Console.WriteLine($"this is {GetType().Name} {Name} 来审核");

            HandleResult = new HandleResult();
            HandleResult.Result = false;
            HandleResult.Massage = $"this is {GetType().Name} 审核 失败";

            if (applyContext.Hour <= 40)
            {
                applyContext.AuditResult = true;
            }
            else
            { 
                NextStep(applyContext);
            }
        }
    }
}
